/* 
 * File:   Lock.cpp
 * Author: pkv
 *
 * Created on August 6, 2011, 8:22 PM
 * 
 * Simple RAII wrapper for SLB mutex mechanism.
 */

#include "Lock.h"

Lock::Lock(Mutex &mutex)
{
    _mutex = &mutex;
    _mutex->lock();
}

Lock::~Lock()
{
    _mutex->unlock();
}
